05. Solution: Your First JOIN

Solutions

    1.
SELECT orders.*, accounts.*
FROM accounts
JOIN orders
ON accounts.id = orders.account_id;

Notice this result is the same as if you switched the tables in the FROM and JOIN. Additionally, which side of the = a column is listed doesn't matter.

  1. SELECT orders.standard_qty, orders.gloss_qty, 
              orders.poster_qty,  accounts.website, 
              accounts.primary_poc
    FROM orders
    JOIN accounts
    ON orders.account_id = accounts.id

Notice that we need to specify every table a column comes from in the SELECT statement.

Code

If you need a code on the https://github.com/udacity.